<!-- 	左边   按钮显示  树  start  -->
	<div class="">
    	<button type="button" class="btn btn-default" onclick="cleanSwiftId();">新建业务模块</button>
    <div id = "swiftTree" class="btn-group-vertical" role="group" aria-label="Vertical button group">
    </div>
    
    <script type="text/javascript">
    $(function(){
    	initSwiftTree();
    });
   	function cleanSwiftId(){
   		document.getElementById("swiftNewForm").reset();
   		swiftId=null;
   	}
    function initSwiftTree(){
    	 $.ajax({
   			url:'/swift/config/baseinfo/listAllSwift',
  			type : 'GET',
  			cache : false,
  			contentType : 'application/json;charset=UTF-8',
  	        success:function(data){
  	        	var button=[];
  	        	for (var k = 0;k < data.length; k++) {
  	        			button.push(addSwiftTree(data[k].id,data[k].funName));
  	        		}
  	        	$("#swiftTree").html(button.join(""));
  	        }
  	    });
    }
    function addSwiftTree(swiftid,value){
    	return '<button type="button" class="btn btn-default" onclick="swiftfunid123('+"'"+swiftid+"'"+');">'+value+'</button>';
    }
 	function swiftfunid123(id){
 		 $.ajax({
 			url:'/swift/config/baseinfo/getSwiftBySwiftId',
			type : 'GET',
			cache : false,
			data : {"swiftId":id},
			contentType : 'application/json;charset=UTF-8',
	        success:function(data){
	        	document.getElementById("swiftNewForm").reset();
	        	$("#swiftNewForm").setForm(data);
	        	swiftId = data.id;
	        	$("#swiftId").val(swiftId);
	        	console.log(swiftId);
	        }
	    });
 	}
    </script>
  </div>

  <!-- 	左边   按钮显示   end  -->